import geo
import pandas as pd

def onfoot(key, start_address, end_address):
    """高德API步行导航"""
    start = geo.geocode(key, start_address)['geocodes'][0]['location']
    end = geo.geocode(key, end_address)['geocodes'][0]['location']
    results = geo.foot(key, start, end)
    df = pd.json_normalize(results['route']['paths'][0]['steps'])
    return df